package com.fanrenqiji.entity;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

/**
 * Created by yanwt on 2017/3/1.
 * 课程事件 任务
 */
@Getter
@Setter
@Entity
@Table(name="tb_event")
@org.hibernate.annotations.Table(appliesTo = "tb_event",comment = "课程事件表")
@org.hibernate.annotations.DynamicInsert
@org.hibernate.annotations.DynamicUpdate
@org.hibernate.annotations.Cache(region="event", usage = CacheConcurrencyStrategy.READ_WRITE)
public class EventEntity extends DataEntity{
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;
    @Column(columnDefinition="varchar(200) not null comment '事件名称'")
    private String name;
    @Column(columnDefinition = ("int(1) not null comment '事件类别 1:课堂问题，2:课堂任务，3:课后作业，4:闯关挑战，5:其他 '"))
    private int category;
    @Column(columnDefinition = ("int(1) not null comment '事件级别 1:初级，2:中级，3:高级'"))
    private int level;
    @Column(columnDefinition = ("int(1) not null comment '完成类型 1:完成，2:评星，3:奖项'"))
    private int finish;
    @Column(name="whether_comment",columnDefinition = ("int(1) not null comment '是否点评 0:否，1:是'"))
    private int whetherComment;
    @Column(name="course_default",columnDefinition = ("int(1) not null comment '课程默认事件 0:否，1:是'"))
    private int courseDefault;
    @Column(name="abstract_content",columnDefinition="text not null comment '事件简介'")
    private String abstractContent;
    @Column(columnDefinition="text not null comment '事件描述'")
    private String description;
    @Column(columnDefinition="text not null comment '意义'")
    private String significance;
    @Column(columnDefinition="text not null comment '点评模板'")
    private String review;

    @Column(name="start_time",columnDefinition="varchar(8) default null comment '开始时间'")
    private String startTime;
    @Column(name="end_time",columnDefinition="varchar(8) default null comment '结束时间'")
    private String endTime;

    @Column(columnDefinition = ("int(1) not null comment '事件频率 1:单次,2:每天,3:每周,4:累计次数'"))
    private int frequency;

}
